/**
 * Company : SIANGKLOM.
 * Created By : Chatree Siangklom
 * Created On : Oct 4, 2013  11:13:06 AM 
 * e-Mail : dr_chatree@hotmail.com
 * Mobile Phone : (+66) 087-921-5115
 * Package Name : com.tis.database.services.promis.impl
 * File Name : VwSyncCustomerServices.java
 * TODO
 */
package com.tis.database.services.promis.impl;

import java.util.List;

import org.hibernate.HibernateException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tis.database.dao.promis.VwSyncCustomerDao;
import com.tis.database.entitys.CustomerNotSend;
import com.tis.database.entitys.promis.VwSyncCustomer;
import com.tis.database.services.promis.IVwSyncCustomerServices;

/**
 * @author Chatree Siangklom of Administrator
 * Date =Oct 4, 2013 : 11:13:06 AM 
 * CreateBy=Chatree Siangklom
 * TODO
 */
@Service
@Transactional(readOnly=true)
public class VwSyncCustomerServicesImpl implements IVwSyncCustomerServices {

	/** (Javadoc)
	 * @see com.tis.database.services.promis.IVwSyncCustomerServices#Search(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)
	 * Date =Oct 4, 2013 : 11:13:06 AM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	@Autowired VwSyncCustomerDao vwSyncCustomerDao;
	@Override
	public List<VwSyncCustomer> Search(	String customerCode, 
										String idNo,
										String taxId, 
										String instanceNo, 
										String createdOnStart,
										String createdOnEnd, 
										int maxResult) throws HibernateException, Exception {
		
		return vwSyncCustomerDao.Search(customerCode, idNo, taxId, instanceNo, createdOnStart, createdOnEnd, maxResult);
		
	}
	/** (Javadoc)
	 * @see com.tis.database.services.promis.IVwSyncCustomerServices#SearchByIsNotSend(int)
	 * Date =Oct 29, 2013 : 4:55:27 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	@Override
	public List<CustomerNotSend> SearchByIsNotSend(int maxResult) throws Exception {

		return vwSyncCustomerDao.SearchByIsNotSend(maxResult);
	}

}
